<?
include('../controller/handler.php');
include('../controller/twitwords.php');
include('../scaffold/user.php');
include('../scaffold/tag.php');

$hd = new Handler();
$tw = new Twitwords();
$hd->openDB();
$tags = $tw->loadAllTags();
$users = $tw->loadAllUsers();
$hd->closeDB();

$find = array("\n", "\t");
$replace = array("<br />", "&nbsp;&nbsp;&nbsp;&nbsp;");

echo "<h1>".count($tags)." tags stored</h1>";
foreach($tags as $tag) {
	echo str_replace($find, $replace, $tag->toString());
}

echo "<h1>".count($users)." users stored</h1>";
foreach($users as $user) {
	echo str_replace($find, $replace, $user->toString());
}


?>